import Vue from 'vue'
import Router from 'vue-router'
import Layout from "@/components/layout/Layout.vue";
import installPermissions from "@/common/permissions.js"


Vue.use(Router)

export default new Router({
    routes: [{
            path: "/",
            name: "home",
            component: () => import("./views/Login.vue"),
            hidden: true,
            meta: {
                name: "登录",
                title: '登录'
            }
        },
        {
            path: "/about",
            name: "about",
            component: () => import("./views/About.vue"),
            hidden: true,
        },
        {
            path: "/",
            name: "members",
            hidden: true,
            meta: {
                icon: "fa fa-user-secret"
            },
            component: Layout,
            children: [{
                path: "/member",
                name: "member",
                meta: {
                    name: "成员管理",
                    icon: "fa fa-user-secret",
                },
                component: () => import("./views/platform/user/member")
            }]
        },
        {
          path:"/",
            name:"good",
            meta:{
                name: "商品信息",
                icon: "fa fa-user-circle-o",
                branch: true
            },
            component: Layout,
            children: [{
                path: "/farmer",
                name: "farmer",
                meta: {
                    name: "商品信息",
                    icon: "fa fa-male",
                },
                component: () => import("./views/pages/good/common/index")
            }
            ]
        },



        {
            path: "/",
            name: "Acl",
            meta: {
                name: "角色权限",
                icon: "fa fa-superpowers",
                branch: true
            },
            component: Layout,
            children: [{
                    path: "/user",
                    name: "user",
                    meta: {
                        name: "用户管理",
                        icon: "fa fa-user",
                    },
                    component: () => import("./views/platform/acl/user")
                },
                {
                    path: "/role",
                    name: "role",
                    meta: {
                        name: "角色管理",
                        icon: "fa fa-eye",
                    },
                    component: () => import("./views/platform/acl/role")
                },
                {
                    path: "/permission",
                    name: "permission",
                    meta: {
                        name: "权限管理",
                        icon: "fa fa-lock",
                    },
                    component: () => import("./views/platform/acl/permission")
                }
            ]
        },
    ]
})